package com.huangliusong.dataobject;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Id;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.huangliusong.enums.OrderStatusEnum;
import com.huangliusong.enums.PayStatusEnum;
import com.huangliusong.utils.serializer.Date2LongSeriaizer;

/**
 * 
 * @author kw-hls OrderMaster OrderMaster
 */
@Entity
public class OrderMaster {
	/**
	 * 订单id
	 */
	@Id
	private String orderId;
	/**
	 * 送货地址
	 */
	private String sendAddr;
	/**
	 * 收货地址
	 */
	private String receiveAddr;
	/**
	 * 配送模式
	 */
	private String deliveryMode;
	/**
	 * 配送时间
	 */
	private Date pickTime;
	/**
	 * 物品价值
	 */
	private String goodValue;
	/**
	 * 物品重量
	 */
	private Double goodWeight;
	/**
	 * 物品类型
	 */
	private String goodType;
	/**
	 * 物品详细描述
	 */
	private String goodDesc;
	/**
	 * 图片地址
	 */
	private String goodImg;
	/**
	 * 微信open_id
	 */
	private String openId;
	/**
	 * 订单总金额
	 */
	private Double orderAmount;
	/**
	 * 订单状态 默认为0 新订单
	 */
	private Integer orderStatus = OrderStatusEnum.NEW.getCode();
	/**
	 * 支付状态 默认为0 未支付
	 */
	private Integer payStatus = PayStatusEnum.WAIT.getCode();
	/**
	 * 创建时间
	 */
	@JsonSerialize(using = Date2LongSeriaizer.class)
	private Date createTime;

	public String getOrderId() {
		return orderId;
	}

	public void setOrderId(String orderId) {
		this.orderId = orderId;
	}

	public String getSendAddr() {
		return sendAddr;
	}

	public void setSendAddr(String sendAddr) {
		this.sendAddr = sendAddr;
	}

	public String getReceiveAddr() {
		return receiveAddr;
	}

	public void setReceiveAddr(String receiveAddr) {
		this.receiveAddr = receiveAddr;
	}

	public String getDeliveryMode() {
		return deliveryMode;
	}

	public void setDeliveryMode(String deliveryMode) {
		this.deliveryMode = deliveryMode;
	}

	public Date getPickTime() {
		return pickTime;
	}

	public void setPickTime(Date pickTime) {
		this.pickTime = pickTime;
	}

	public String getGoodValue() {
		return goodValue;
	}

	public void setGoodValue(String goodValue) {
		this.goodValue = goodValue;
	}

	public Double getGoodWeight() {
		return goodWeight;
	}

	public void setGoodWeight(Double goodWeight) {
		this.goodWeight = goodWeight;
	}

	public String getGoodType() {
		return goodType;
	}

	public void setGoodType(String goodType) {
		this.goodType = goodType;
	}

	public String getGoodDesc() {
		return goodDesc;
	}

	public void setGoodDesc(String goodDesc) {
		this.goodDesc = goodDesc;
	}

	public String getGoodImg() {
		return goodImg;
	}

	public void setGoodImg(String goodImg) {
		this.goodImg = goodImg;
	}

	public String getOpenId() {
		return openId;
	}

	public void setOpenId(String openId) {
		this.openId = openId;
	}

	public Double getOrderAmount() {
		return orderAmount;
	}

	public void setOrderAmount(Double orderAmount) {
		this.orderAmount = orderAmount;
	}

	public Integer getOrderStatus() {
		return orderStatus;
	}

	public void setOrderStatus(Integer orderStatus) {
		this.orderStatus = orderStatus;
	}

	public Integer getPayStatus() {
		return payStatus;
	}

	public void setPayStatus(Integer payStatus) {
		this.payStatus = payStatus;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	@Override
	public String toString() {
		return "OrderMaster [orderId=" + orderId + ", sendAddr=" + sendAddr + ", receiveAddr=" + receiveAddr
				+ ", deliveryMode=" + deliveryMode + ", pickTime=" + pickTime + ", goodValue=" + goodValue
				+ ", goodWeight=" + goodWeight + ", goodType=" + goodType + ", goodDesc=" + goodDesc + ", goodImg="
				+ goodImg + ", openId=" + openId + ", orderAmount=" + orderAmount + ", orderStatus=" + orderStatus
				+ ", payStatus=" + payStatus + ", createTime=" + createTime + "]";
	}

}
